import numpy as np

cie_y = [
    0.000003917000, 0.000004393581, 0.000004929604, 0.000005532136, 0.000006208245,
    0.000006965000, 0.000007813219, 0.000008767336, 0.000009839844, 0.00001104323,
    0.00001239000, 0.00001388641, 0.00001555728, 0.00001744296, 0.00001958375,
    0.00002202000, 0.00002483965, 0.00002804126, 0.00003153104, 0.00003521521,
    0.00003900000, 0.00004282640, 0.00004691460, 0.00005158960, 0.00005717640,
    0.00006400000, 0.00007234421, 0.00008221224, 0.00009350816, 0.0001061361,
    0.0001200000, 0.0001349840, 0.0001514920, 0.0001702080, 0.0001918160,
    0.0002170000, 0.0002469067, 0.0002812400, 0.0003185200, 0.0003572667,
    0.0003960000, 0.0004337147, 0.0004730240, 0.0005178760, 0.0005722187,
    0.0006400000, 0.0007245600, 0.0008255000, 0.0009411600, 0.001069880,
    0.001210000, 0.001362091, 0.001530752, 0.001720368, 0.001935323,
    0.002180000, 0.002454800, 0.002764000, 0.003117800, 0.003526400,
    0.004000000, 0.004546240, 0.005159320, 0.005829280, 0.006546160,
    0.007300000, 0.008086507, 0.008908720, 0.009767680, 0.01066443,
    0.01160000, 0.01257317, 0.01358272, 0.01462968, 0.01571509,
    0.01684000, 0.01800736, 0.01921448, 0.02045392, 0.02171824,
    0.02300000, 0.02429461, 0.02561024, 0.02695857, 0.02835125,
    0.02980000, 0.03131083, 0.03288368, 0.03452112, 0.03622571,
    0.03800000, 0.03984667, 0.04176800, 0.04376600, 0.04584267,
    0.04800000, 0.05024368, 0.05257304, 0.05498056, 0.05745872,
    0.06000000, 0.06260197, 0.06527752, 0.06804208, 0.07091109,
    0.07390000, 0.07701600, 0.08026640, 0.08366680, 0.08723280,
    0.09098000, 0.09491755, 0.09904584, 0.1033674, 0.1078846,
    0.1126000, 0.1175320, 0.1226744, 0.1279928, 0.1334528,
    0.1390200, 0.1446764, 0.1504693, 0.1564619, 0.1627177,
    0.1693000, 0.1762431, 0.1835581, 0.1912735, 0.1994180,
    0.2080200, 0.2171199, 0.2267345, 0.2368571, 0.2474812,
    0.2586000, 0.2701849, 0.2822939, 0.2950505, 0.3085780,
    0.3230000, 0.3384021, 0.3546858, 0.3716986, 0.3892875,
    0.4073000, 0.4256299, 0.4443096, 0.4633944, 0.4829395,
    0.5030000, 0.5235693, 0.5445120, 0.5656900, 0.5869653,
    0.6082000, 0.6293456, 0.6503068, 0.6708752, 0.6908424,
    0.7100000, 0.7281852, 0.7454636, 0.7619694, 0.7778368,
    0.7932000, 0.8081104, 0.8224962, 0.8363068, 0.8494916,
    0.8620000, 0.8738108, 0.8849624, 0.8954936, 0.9054432,
    0.9148501, 0.9237348, 0.9320924, 0.9399226, 0.9472252,
    0.9540000, 0.9602561, 0.9660074, 0.9712606, 0.9760225,
    0.9803000, 0.9840924, 0.9874812, 0.9903128, 0.9928116,
    0.9949501, 0.9967108, 0.9980983, 0.9991120, 0.9997482,
    1.0000000, 0.9998567, 0.9993046, 0.9983255, 0.9968987,
    0.9950000, 0.9926005, 0.9897426, 0.9864444, 0.9827241,
    0.9786000, 0.9740837, 0.9691712, 0.9638568, 0.9581349,
    0.9520000, 0.9454504, 0.9384992, 0.9311628, 0.9234576,
    0.9154000, 0.9070064, 0.8982772, 0.8892048, 0.8797816,
    0.8700000, 0.8598613, 0.8493920, 0.8386220, 0.8275813,
    0.8163000, 0.8047947, 0.7930820, 0.7811920, 0.7691547,
    0.7570000, 0.7447541, 0.7324224, 0.7200036, 0.7074965,
    0.6949000, 0.6822192, 0.6694716, 0.6566744, 0.6438448,
    0.6310000, 0.6181555, 0.6053144, 0.5924756, 0.5796379,
    0.5668000, 0.5539611, 0.5411372, 0.5283528, 0.5156323,
    0.5030000, 0.4904688, 0.4780304, 0.4656776, 0.4534032,
    0.4412000, 0.4290800, 0.4170360, 0.4050320, 0.3930320,
    0.3810000, 0.3689184, 0.3568272, 0.3447768, 0.3328176,
    0.3210000, 0.3093381, 0.2978504, 0.2865936, 0.2756245,
    0.2650000, 0.2547632, 0.2448896, 0.2353344, 0.2260528,
    0.2170000, 0.2081616, 0.1995488, 0.1911552, 0.1829744,
    0.1750000, 0.1672235, 0.1596464, 0.1522776, 0.1451259,
    0.1382000, 0.1315003, 0.1250248, 0.1187792, 0.1127691,
    0.1070000, 0.1014762, 0.09618864, 0.09112296, 0.08626485,
    0.08160000, 0.07712064, 0.07282552, 0.06871008, 0.06476976,
    0.06100000, 0.05739621, 0.05395504, 0.05067376, 0.04754965,
    0.04458000, 0.04175872, 0.03908496, 0.03656384, 0.03420048,
    0.03200000, 0.02996261, 0.02807664, 0.02632936, 0.02470805,
    0.02320000, 0.02180077, 0.02050112, 0.01928108, 0.01812069,
    0.01700000, 0.01590379, 0.01483718, 0.01381068, 0.01283478,
    0.01192000, 0.01106831, 0.01027339, 0.009533311, 0.008846157,
    0.008210000, 0.007623781, 0.007085424, 0.006591476, 0.006138485,
    0.005723000, 0.005343059, 0.004995796, 0.004676404, 0.004380075,
    0.004102000, 0.003838453, 0.003589099, 0.003354219, 0.003134093,
    0.002929000, 0.002738139, 0.002559876, 0.002393244, 0.002237275,
    0.002091000, 0.001953587, 0.001824580, 0.001703580, 0.001590187,
    0.001484000, 0.001384496, 0.001291268, 0.001204092, 0.001122744,
    0.001047000, 0.0009765896, 0.0009111088, 0.0008501332, 0.0007932384,
    0.0007400000, 0.0006900827, 0.0006433100, 0.0005994960, 0.0005584547,
    0.0005200000, 0.0004839136, 0.0004500528, 0.0004183452, 0.0003887184,
    0.0003611000, 0.0003353835, 0.0003114404, 0.0002891656, 0.0002684539,
    0.0002492000, 0.0002313019, 0.0002146856, 0.0001992884, 0.0001850475,
    0.0001719000, 0.0001597781, 0.0001486044, 0.0001383016, 0.0001287925,
    0.0001200000, 0.0001118595, 0.0001043224, 0.00009733560, 0.00009084587,
    0.00008480000, 0.00007914667, 0.00007385800, 0.00006891600, 0.00006430267,
    0.00006000000, 0.00005598187, 0.00005222560, 0.00004871840, 0.00004544747,
    0.00004240000, 0.00003956104, 0.00003691512, 0.00003444868, 0.00003214816,
    0.00003000000, 0.00002799125, 0.00002611356, 0.00002436024, 0.00002272461,
    0.00002120000, 0.00001977855, 0.00001845285, 0.00001721687, 0.00001606459,
    0.00001499000, 0.00001398728, 0.00001305155, 0.00001217818, 0.00001136254,
    0.00001060000, 0.000009885877, 0.000009217304, 0.000008592362, 0.000008009133,
    0.000007465700, 0.000006959567, 0.000006487995, 0.000006048699, 0.000005639396,
    0.000005257800, 0.000004901771, 0.000004569720, 0.000004260194, 0.000003971739,
    0.000003702900, 0.000003452163, 0.000003218302, 0.000003000300, 0.000002797139,
    0.000002607800, 0.000002431220, 0.000002266531, 0.000002113013, 0.000001969943,
    0.000001836600, 0.000001712230, 0.000001596228, 0.000001488090, 0.000001387314,
    0.000001293400, 0.000001205820, 0.000001124143, 0.000001048009, 0.0000009770578,
    0.0000009109300, 0.0000008492513, 0.0000007917212, 0.0000007380904, 0.0000006881098,
    0.0000006415300, 0.0000005980895, 0.0000005575746, 0.0000005198080, 0.0000004846123,
    0.0000004518100]


def compute_cie_y_integral():
    array = np.array(cie_y)
    return 0.5 * np.sum(array[:-1] + array[1:])


def compute_inner_product_with_cie_y(values):
    return np.sum(np.array(cie_y) * np.array(values))


if __name__ == "__main__":
    print(compute_cie_y_integral())
